﻿namespace Sai.Core.Rules
{
	using System.Collections.Generic;
	using System.Collections.ObjectModel;

	public class RulePluginRepository : IRulePluginRepository
	{
        private List<ITypeRule> _typeRules = new List<ITypeRule>();
        private List<IAssemblyRule> _assemblyRules = new List<IAssemblyRule>();

        public Collection<ITypeRule> TypeRules
		{
			get 
			{
                return new Collection<ITypeRule>(this._typeRules); 
			}
		}

        public Collection<IAssemblyRule> AssemblyRules
        {
            get
            {
                return new Collection<IAssemblyRule>(this._assemblyRules);
            }
        }

        public void Add(ITypeRule rule)
        {
            this._typeRules.Add(rule);
        }

        public void Add(IAssemblyRule rule)
		{
            this._assemblyRules.Add(rule);
		}
	}
}
